/* eslint valid-jsdoc: "off" */

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1733216720723_4504';

  // add your middleware config here
  config.middleware = [];

  config.multipart = {
    mode: 'file',
  };

  config.filetype = new Map([
    [ 'PNG', 'IMAGE' ],
    [ 'JPEG', 'IMAGE' ],
    [ 'JPG', 'IMAGE' ],
    [ 'MP4', 'VIDEO' ],
    [ 'MP3', 'AUDIO' ],
    [ 'ZIP', 'ZIP' ],
    [ 'RAR', 'ZIP' ],
  ]);


  config.cluster = {
    listen: {
      path: '',
      port: 8107,
      hostname: '0.0.0.0',
    },
  };
  config.security = {
    csrf: {
      enable: false,
    },
  };

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};
